<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/' }">
        <i class="el-icon-caret-right"></i> 收藏</el-breadcrumb-item>
    </el-breadcrumb>

    <el-divider></el-divider>
    <el-row gutter="20">
      <el-col style="margin: 10px 0" span="6" v-for="p in productArr">
        <el-card>
          <a :href="'/deil?id='+p.gid">
            <img :src="p.url" width="100%" alt="" class="p_img">
          </a>
          <div style="padding: 30px 0 0 20px;">
            <a style="text-decoration: none;color: #3f3f3f;font-size:smaller" :href="'/deil?id='+p.gid">
              {{p.name}}
            </a>
          </div>
        </el-card>
      </el-col>
    </el-row>





  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      productArr:[]
    }
  },
  methods: {
    //查收藏信息
    listCollection(){
      let url = "http://localhost:8080/collection/list";
      axios.get(url).then((response)=>{
        this.productArr=response.data.data;
      })
    },
  },
  mounted() {
    this.listCollection();
  }
}
</script>

<style scoped>

</style>